package practise.File和递归.关卡一;

public class 案例二 {
    public static void main(String[] args) {

        int num = 10;
        System.out.println(num+"的阶乘是"+sum(num));

    }
    static int sum(int num) {
        if (num == 1) {
            return 1 ;
        }else {
            return num*sum(num-1);
        }
    }
}
